package tmp;

// Generated 04-nov-2009 18:40:40 by Hibernate Tools 3.2.4.GA

import java.util.Date;
import java.util.HashSet;
import java.util.Set;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * Request generated by hbm2java
 */
@Entity
@Table(name = "request", catalog = "fmanzano_gem")
public class Request implements java.io.Serializable {

	private Integer solId;
	private EntryRegNumbers entryRegNumbers;
	private Expedient expedient;
	private byte[] solContent;
	private Date solDate;
	private boolean solInitial;
	private byte[] solProposal;
	private boolean solType;
	private Set<CitizenRequests> citizenRequestses = new HashSet<CitizenRequests>(
			0);

	public Request() {
	}

	public Request(byte[] solContent, Date solDate, boolean solInitial,
			boolean solType) {
		this.solContent = solContent;
		this.solDate = solDate;
		this.solInitial = solInitial;
		this.solType = solType;
	}

	public Request(EntryRegNumbers entryRegNumbers, Expedient expedient,
			byte[] solContent, Date solDate, boolean solInitial,
			byte[] solProposal, boolean solType,
			Set<CitizenRequests> citizenRequestses) {
		this.entryRegNumbers = entryRegNumbers;
		this.expedient = expedient;
		this.solContent = solContent;
		this.solDate = solDate;
		this.solInitial = solInitial;
		this.solProposal = solProposal;
		this.solType = solType;
		this.citizenRequestses = citizenRequestses;
	}

	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "SOL_ID", unique = true, nullable = false)
	public Integer getSolId() {
		return this.solId;
	}

	public void setSolId(Integer solId) {
		this.solId = solId;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "REG_ID")
	public EntryRegNumbers getEntryRegNumbers() {
		return this.entryRegNumbers;
	}

	public void setEntryRegNumbers(EntryRegNumbers entryRegNumbers) {
		this.entryRegNumbers = entryRegNumbers;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "EXP_ID")
	public Expedient getExpedient() {
		return this.expedient;
	}

	public void setExpedient(Expedient expedient) {
		this.expedient = expedient;
	}

	@Column(name = "SOL_CONTENT", nullable = false)
	public byte[] getSolContent() {
		return this.solContent;
	}

	public void setSolContent(byte[] solContent) {
		this.solContent = solContent;
	}

	@Temporal(TemporalType.DATE)
	@Column(name = "SOL_DATE", nullable = false, length = 10)
	public Date getSolDate() {
		return this.solDate;
	}

	public void setSolDate(Date solDate) {
		this.solDate = solDate;
	}

	@Column(name = "SOL_INITIAL", nullable = false)
	public boolean isSolInitial() {
		return this.solInitial;
	}

	public void setSolInitial(boolean solInitial) {
		this.solInitial = solInitial;
	}

	@Column(name = "SOL_PROPOSAL")
	public byte[] getSolProposal() {
		return this.solProposal;
	}

	public void setSolProposal(byte[] solProposal) {
		this.solProposal = solProposal;
	}

	@Column(name = "SOL_TYPE", nullable = false)
	public boolean isSolType() {
		return this.solType;
	}

	public void setSolType(boolean solType) {
		this.solType = solType;
	}

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "request")
	public Set<CitizenRequests> getCitizenRequestses() {
		return this.citizenRequestses;
	}

	public void setCitizenRequestses(Set<CitizenRequests> citizenRequestses) {
		this.citizenRequestses = citizenRequestses;
	}

}
